Talk:UTCClock
Expanded Wiki Navigation This code needs an update to be compatible with the New Expanded Wiki navigation. Leviathan_89 18:53, October 10, 2011 (UTC) :An example would be this code. It would be cool to have the possibility to set the timezone or the local language. Leviathan_89 19:05, October 10, 2011 (UTC) ::I realise this post was made almost a year ago, but for completeness... I've adopted this script and have rewritten it so that it works with expanded nav. I haven't given it the ability to set the timezone as, IMHO, the whole point is to see the server (UTC/GMT) time; you probably already have your own clock on your computer if you use Windows or OS X, most Linux set-ups have clocks as well so the local time is not very useful. It is now possible to localise it now using a custom format string, I could set up a i18n repository in the script for default formats for multiple languages but people should be able to just alter the clock to look however they want. Lunarity 10:26, September 2, 2012 (UTC) New feature I'd like to have the possibility of add a custom hover message also I don't know if I miss it, but there isn't a variable to display the day name in the user's language as %B does with the month name. I can use %{Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday}w but I believe it will display only the text I choose. leviathan_89 13:36, October 3, 2012 (UTC) :#That's correct. It's a limitation of MediaWiki, only the Month names are available to me (wgMonthNames and wgMonthNamesShort, there isn't any wgDayNames), there's no source for the day names so I can't offer that feature at the moment. Sorry. The best I can suggest is the %x option, but that produces wildly uncontrolled output (Day name, number, year, month in the user's locale order). :#That's somewhat of an oversight on my part, I forgot to expose the hover text as a configuration option, it won't take long to add. :Lunarity 13:49, October 3, 2012 (UTC) ::Okay, the option is called hoverText. I'll update the doc page but that'll take a few minutes. Lunarity 13:54, October 3, 2012 (UTC) Time Zones Is there a way to make it show a differ time other than UTC? For instance I live in the Texas, USA (Central Standard Time or CST or UTC - 6) Is there a way to change the hours displayed backwards by 6 hours? -- 23:46, March 3, 2013 (UTC) : No, sorry, the timezone isn't configurable. The purpose of this widget is to see the server time. It's aimed at making it easy to check the time in signatures on Talk pages relative to the current time, anonymous editors also see all times in UTC so it's very helpful when trying to make sense of History and Recent Changes, and it's also useful for Wikis with the achievement system active; since whenever achievements say "days", they mean UTC 00:00->23:59 is one day. UTC is also standard for coordinating an event with people across multiple timezones. It's kind of pointless otherwise since you should have a clock in local time on your computer's UI already (taskbar Windows / top menu bar Mac / "Charms" bar 8). Lunarity 03:42, March 4, 2013 (UTC) :: Actually, that's not very helpful if you want to coordinate based on a particular local time zone (for instance a game server in New York or Los Angeles). It won't help you when everything in the game refers to "today" or "tomorrow" as a timezone that isn't your personal local time or UTC. --'Vandraedha (talk · )' 09:40, May 3, 2013 (UTC) :::I realize this is years late, but in case anyone else drops in wondering the same thing: Though this DisplayClock isn't meant to be configurable, it's a very easy adjustment if you want to go the step of making your own copy of the .js file. Find the line in the code d.setMinutes(d.getMinutes() + d.getTimezoneOffset()); // To UTC You can then adjust the time by addition or subtraction of minutes, between those last parentheses. I wanted UTC + 9 hours, so it became d.setMinutes(d.getMinutes() + d.getTimezoneOffset() + 540); // To UTC + 540 to JST JoshuaJSlone (talk) 20:50, April 13, 2016 (UTC) Hover Text This Is the current hover text, why is it named regenerate the page, that seems very aimed at the Doctor Who wikia, could somebody change it to refresh? hoverText: "Click here to make the server purge and regenerate (update) this page" :- — FarewellEleven at Wikia Developers Wiki 10:04, August 13, 2013 (UTC) :Doesn't really matter as it is customizable.' ~ UltimateSupreme' 10:36, August 13, 2013 (UTC) :Regenerate as in "create again". That's what purge does (or is supposed to do), I believe. ~Bobogoobo (talk) 21:57, August 13, 2013 (UTC) Here ya go: hoverText: "Click here to make the server purge and refresh this page" Copy the code from ../code.js to yoursite/MediaWiki:UTCClock/code.js and replace the above line in the code. Then add an import statement in your MediaWiki:Common.js, such as importArticle({ type: 'script', article: [ 'MediaWiki:DisplayClock.js' ] }); —RyaNayR (talk) 06:47, November 24, 2013 (UTC) :If a user is incapable of reading the documentation to realise that you can change the default message with the config options, do you really think having them keep the script on a page of their wiki where they would have to maintain it is a good idea? It's kind of the whole point behind writing scripts for other people to use here. Nice Inspired by your documentation I tested format: '%2H:%2M:%2S %{Mon;Tues;Wednes;Thurs;Fri;Satur;Sun}uday',, and it worked like a charme. Maybe mention that UTCClock can be used instead of PurgeButton — I only guessed this, because it was mentioned on another page and because the mw: clock gadget offers purge. –Dunnoob (talk) 04:38, December 7, 2013 (UTC) CSS doesn't update In Common.css I put a#DisplayClockJS {color: green !important} and a#DisplayClockJS {text-align: left; color: green !important} but nothing happens. Alysdexia (talk) 11:35, November 7, 2014 (UTC) : Common.css is not used in skin Wikia. Add the rules to Wikia.css. Arkondi (talk) 12:31, November 7, 2014 (UTC) ::Um, actually it is. Monobook.css is for Monobook, Wikia.css is for Oasis, and Common.css is for both. ::: And I'm very glad that Wikia changed this. Arkondi (talk) 09:57, December 4, 2014 (UTC) zero padding Time numbers are not zero padded. leviathan_89 13:05, October 7, 2016 (UTC) :Time padding seems to be working for me (using the default format). Have you customised the display format at all? :For example, %2H:%2M:%2S will pad each number to 2 digits (the default format for the time), whereas %H:%M:%S would show each number without padding. - OneTwoThreeFall talk 11:51, May 19, 2017 (UTC) ::Oh you are right! I didn't realized -_-' . leviathan_89 12:26, May 19, 2017 (UTC) New header Would it be possible to adapt this to the new header? leviathan_89 20:19, May 17, 2017 (UTC) :Added. It may need minor tweaking though (at least via site-CSS). Rappy 07:20, May 18, 2017 (UTC) ::Yes, the text color should be the same as plain text. Can't the CSS be added from the script itself? Also there is still the zero padding problem, which is strange because I see a "pad function" in the script, although I don't fully understand if that's its purpose. leviathan_89 11:52, May 18, 2017 (UTC) ::I think I solved the color issue at least. leviathan_89 14:37, May 18, 2017 (UTC) :::Anyway not to have tweaking on every wiki we see it on? Right now on CC it's not readable with the header. DEmersonJMFM 02:08, May 19, 2017 (UTC) ::::The JS has yet to be approved. leviathan_89 09:34, May 19, 2017 (UTC) :::::This is temporary anyways. The time would have to find a new home in the new header. Rappy 18:45, May 19, 2017 (UTC) What do you mean? leviathan_89 09:55, May 20, 2017 (UTC) :I mean the timestamp would have to find a new home outside of the new header. Rappy 00:17, May 21, 2017 (UTC) :: You're correct Rappy or it will be restricted to personal use only MarTsok 01:17, June 10, 2017 (UTC) :::Why not posit it under the new header? I see it more fitting.--Luma.dash (talk) 11:57, June 10, 2017 (UTC) ::::Unfortunately not, the both the new navbar and the article header is strictly restricted to personal editing. My own suggestion is to put it under the wiki header which is at the very bottom of the page (Includes the watch/my tools/shortcuts links). MarTsok 14:03, June 11, 2017 (UTC) ::::That won't work for blog pages. Currently, this script will have to be personal-only (or Monobook) until a better placement is found. Rappy 00:50, June 13, 2017 (UTC) The changes won't work on the new header. Wikia split PremiumPageHeader extension into two new extensions, PageHeader and CommunityHeader, and the classes were changed. (No .pph classes anymore) -- Cube-shaped 08:55, June 13, 2017 (UTC) ::Re "My own suggestion is to put it under the wiki header which is at the very bottom of the page (Includes the watch/my tools/shortcuts links)": that already exists as DisplayTimer. --'Sophie' 09:02, June 13, 2017 (UTC) :I don't know what the whole issue is about it having to be restricted to personal use, apart from the conflict that will be caused by the new header changes, but I strongly support changes being made to the script so that it can continue being used wiki-wide, since it will cause a lot of complaints from communities that use the script. ― C.Syde (talk | contribs) 13:12, June 13, 2017 (UTC) :: Use it sitewide only for monobook for now. MarTsok 18:25, June 13, 2017 (UTC) :::That doesn't explain why it has to be site-wide only for mono-book though. ― C.Syde (talk | contribs) 20:57, June 13, 2017 (UTC) ::::Is it still working? Because after Rappy did rename the script, I cannot get the clock working. (And I changed to the new url if anyone asks).--Luma.dash (talk) 21:25, June 13, 2017 (UTC) :::::Staff must have done something to prevent it from working site-wide. ¯\_(ツ)_/¯ ― C.Syde (talk | contribs) 21:37, June 13, 2017 (UTC) ::::::But, it does not appear to me by using my personal JS.--Luma.dash (talk) 21:49, June 13, 2017 (UTC) As I already said above, this was updated to work with the header before the sitewide release, which has no classes in common with the header after the release. It needs to be updated. -- Cube-shaped 21:52, June 13, 2017 (UTC) ::::::::Oh, sorry, I didn't understand that situation was like this. But, now, this function is rendered useless, except for Monobook users.--Luma.dash (talk) 21:59, June 13, 2017 (UTC) :Works for me (monobook + oasis), no idea why it was renamed. ––Dunnoob �� 21:35, October 11, 2017 (UTC) :: It was renamed because many wikis had it imported in site JS and after the header update it became a customization policy violation, so instead of having to remove the script from many site JavaScript imports Staff just renamed the script to break these imports. -- Cube-shaped 21:38, October 11, 2017 (UTC) :: "UTCClock" is a more appropriate name than "DisplayClock" was because the later gave the impression that it would display your current time and not the UTC time. 23:03, October 11, 2017 (UTC) FANDOM Redesign Honestly I'm rather disappointed with the new design of the UTC Clock. Is there any way to get the original style back, even as a personal script so that those who favour the old design can continue using it whilst still receiving updates to it to prevent the old design from becoming broken? ― C.Syde (talk | contribs) 03:56, July 17, 2018 (UTC) :It looks the same as it's always been to me? Are you sure it isn't site/user js/css affecting it for you? --'Sophie' 04:12, July 17, 2018 (UTC) :: ::That is what it currently looks like to me, but I've checked and it does only seem to be occurring on that particular wiki, and only when browsing in incognito mode. ― C.Syde (talk | contribs) 04:35, July 17, 2018 (UTC) :::The File:SeeMoreActivityButton button is looking different due to your site css, so you will need to edit your wiki's css to make it work. Also, thats the DisplayTimer script, not the URCClock script, and I still don't see any difference between the one in your screenshot and how it's always looked. --'Sophie' 04:44, July 17, 2018 (UTC) ::::Now it's affecting the CC CSS while browsing in incognito. ― C.Syde (talk | contribs) 04:48, July 17, 2018 (UTC) :::::Neither of the scripts in your screenshot are UTCClock, so you might want to go to either DisplayTimer's or SeeMoreActivityButton's talk page. --04:50, July 17, 2018 (UTC)